package main

import "fmt"

func main() {
	pq := NewPriorityQueue(true)
	pq.EnQueue(1)
	pq.EnQueue(5)
	pq.EnQueue(100)
	pq.EnQueue(20)

	//输出结果 100 200 5 1 -1
	ele, _ := pq.deQueue()
	fmt.Println(ele)

	ele, _ = pq.deQueue()
	fmt.Println(ele)

	ele, _ = pq.deQueue()
	fmt.Println(ele)

	ele, _ = pq.deQueue()
	fmt.Println(ele)

	ele, _ = pq.deQueue()
	fmt.Println(ele)

}
